package com.ruoyi.meeting.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.meeting.dto.TmdMeetingPersonDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.meeting.mapper.TmdMeetingManagerMapper;
import com.ruoyi.meeting.domain.TmdMeetingManager;
import com.ruoyi.meeting.service.ITmdMeetingManagerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 会议室管理Service业务层处理
 * 
 * @author hdy
 * @date 2024-04-19
 */
@Service
public class TmdMeetingManagerServiceImpl implements ITmdMeetingManagerService 
{
    @Autowired
    private TmdMeetingManagerMapper tmdMeetingManagerMapper;

    /**
     * 查询会议室管理
     * 
     * @param id 会议室管理主键
     * @return 会议室管理
     */
    @Override
    public TmdMeetingManager selectTmdMeetingManagerById(Long id)
    {
        return tmdMeetingManagerMapper.selectTmdMeetingManagerById(id);
    }

    /**
     * 查询会议室管理列表
     * 
     * @param tmdMeetingManager 会议室管理
     * @return 会议室管理
     */
    @Override
    public List<TmdMeetingManager> selectTmdMeetingManagerList(TmdMeetingManager tmdMeetingManager)
    {
        return tmdMeetingManagerMapper.selectTmdMeetingManagerList(tmdMeetingManager);
    }

    /**
     * 新增会议室管理
     * 
     * @param tmdMeetingManager 会议室管理
     * @return 结果
     */
    @Override
    public int insertTmdMeetingManager(TmdMeetingManager tmdMeetingManager)
    {
        tmdMeetingManager.setCreateTime(DateUtils.getNowDate());
        return tmdMeetingManagerMapper.insertTmdMeetingManager(tmdMeetingManager);
    }

    /**
     * 修改会议室管理
     * 
     * @param tmdMeetingManager 会议室管理
     * @return 结果
     */
    @Override
    public int updateTmdMeetingManager(TmdMeetingManager tmdMeetingManager)
    {
        return tmdMeetingManagerMapper.updateTmdMeetingManager(tmdMeetingManager);
    }

    /**
     * 批量删除会议室管理
     * 
     * @param ids 需要删除的会议室管理主键
     * @return 结果
     */
    @Override
    public int deleteTmdMeetingManagerByIds(String ids)
    {
        return tmdMeetingManagerMapper.deleteTmdMeetingManagerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除会议室管理信息
     * 
     * @param id 会议室管理主键
     * @return 结果
     */
    @Override
    public int deleteTmdMeetingManagerById(Long id)
    {
        return tmdMeetingManagerMapper.deleteTmdMeetingManagerById(id);
    }

    @Override
    public List<TmdMeetingPersonDto> selectMeetPersonById(Long id) {
        return tmdMeetingManagerMapper.selectMeetPersonById(id);
    }

    @Override
    public List<TmdMeetingManager> getMeetingRoom() {
        return tmdMeetingManagerMapper.getMeetingRoom();
    }
}
